//
//  UserLogoutSuccessPage.swift
//  chat
//
//  Created by 1 on 2023/4/10.
//

import SwiftUI

struct UserLogoutSuccessPage: View {
    
    @Environment(\.presentationMode) var presentationMode
    @Binding var shouldPopToRootView : Bool
        
    var body: some View {
        VStack(spacing: 24){
            Spacer().frame(height: 100)
            
            Image(systemName: "checkmark.seal.fill").font(.system(size: 70))
            Text("注销成功，您的账户稍后在所有设备上登出。")
            
            Button {
                self.shouldPopToRootView = false
                
            } label: {
                Text("返回首页")
                    .padding(.vertical,10)
                    .padding(.horizontal,30)
                    .background(.blue)
                    .cornerRadius(8)
            }
            
            Spacer()
        }
        .foregroundColor(MBAColor.com_white.color)
        .padding(.horizontal,16)
        .frame(minWidth: 0,maxWidth: .infinity,minHeight: 0,maxHeight: .infinity)
        .navigationBarTitleDisplayMode(.inline)
        .navigationTitle("注销账号成功")
        .navigationBarBackButtonHidden(true)
        .background(MBAColor.com_background.color)
        
    }
}

struct UserLogoutSuccessPage_Previews: PreviewProvider {
    static var previews: some View {
        UserLogoutSuccessPage(shouldPopToRootView: .constant(false))
    }
}
